package sdkshell.kuaiyan.com.kuaiyansdk.http.httpIpm;


import sdkshell.kuaiyan.com.kuaiyansdk.http.Ihttp.ExceptionConfig;

/**
 * Created by Administrator on 2016/7/11.
 */
public class ExceptionConfigImp implements ExceptionConfig {
    private boolean showNoNetWorkToast = true;
    private boolean showIoExceptionToast = true;
    private boolean showGsonExcetionToast = false;
    private boolean showNoWifyExceptionToast = false;
    @Override
    public boolean isShowGsonExcetionToast() {
        return showGsonExcetionToast;
    }

    @Override
    public ExceptionConfig setShowGsonExcetionToast(boolean showGsonExcetionToast) {
        this.showGsonExcetionToast = showGsonExcetionToast;
        return this;
    }

    @Override
    public ExceptionConfig toastForNoNetwork(boolean show) {
        this.showNoNetWorkToast = show;
        return this;
    }

    @Override
    public ExceptionConfig toastIoForException(boolean show) {
        showIoExceptionToast = show;
        return this;
    }

    @Override
    public boolean getToastForNoNetwork() {
        return showNoNetWorkToast;
    }

    @Override
    public boolean getToastForIoException() {
        return showIoExceptionToast;
    }

    @Override
    public boolean getToastForNowifyExcetion() {
        return showNoWifyExceptionToast;
    }

    @Override
    public ExceptionConfig toastIoForNoWifyException(boolean show) {
        this.showNoWifyExceptionToast = show;
        return this;
    }
}
